{extend name="public:common_edit"/}
{block name="css"}
    <link href="/public/plugs/switch-button/css/bootstrap-switch.css" rel="stylesheet">
{/block}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i>{$title}</h3>
        </div>
        <div class="panel-body">
            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                    <label class="control-label" for="input-order-id">昵称</label>
                    <div class="input-group">
                        <input type="text" name="nick_name" value="{:trim(input('nick_name'))}" placeholder="昵称"
                               id="input-order-id" class="form-control">
                    </div>
                    <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                            id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                    </button>
                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>id</td>
                                <td>用户头像</td>
                                <td>用户昵称</td>
                                <td>最新内容</td>
                                <td>留言时间</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row"}
                            <tr>
                                <td>{$row.id}</td>
                                <td><img src="{$row.header_img}" style="max-width: 100px" alt=""></td>
                                <td>{$row.nick_name}</td>
                                <td>{$row.content|sub_str=100}</td>
                                <td>{$row.create_time}</td>
                                <td>
                                    <a class="btn btn-primary " href="{:url('leave_edit',['id'=>$row.user_id])}">查看回复</a>
                                    <span class="btn btn-danger check_del" data-url="{:url('leave_del',['id'=>$row['user_id']])}">删除</span>
                                </td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}

{block name="js"}
<script>

</script>
{/block}